package library.User;

import library.operation.*;

import java.util.Scanner;

public class Admin extends User {
//    private IOperation[] operation;

    public Admin(String name) {
        super(name);
        operations = new IOperation[]{
                new ExitOperation(),
                new ListOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
        };
    }

    //打印管理员菜单
    @Override
    public int menu() {
        System.out.println("==============================");
        System.out.println("欢迎您"+name+"!");
        System.out.println("1:查看书籍列表");
        System.out.println("2:按照名字查找图书");
        System.out.println("3:新增图书");
        System.out.println("4:删除图书");
        System.out.println("0:退出");
        System.out.println("==============================");
        System.out.println("请输入您的选择");
        Scanner scanner = new Scanner(System.in);
        int chioce = scanner.nextInt();
        return chioce;

    }
}
